<template>
  <div class="my-product">
    <h3>标题: {{ title }}</h3>
  </div>
</template>

<script>
export default {
  //props:['传过来的属性名1'，...]
  //子组件收到数据后，想怎么用就怎么用，和data一样
  props: {
    title:{
      default:'默认标题',
      type:String
    }
    
  }
  
}
</script>

<style>
.my-product {
  width: 400px;
  padding: 20px;
  border: 2px solid #000;
  border-radius: 5px;
  margin: 10px;
}
</style scoped>